/********************************************************************
Name: Table A15: Effect of Dem Sheriff on Number of Detainer Requests
Author: Dan Thompson
Date: August 2019
Notes:
********************************************************************/

* Set the working directory 
gl root = "$sanctuary_root"
gl root = "YOUR_WORKING_DIRECTORY"

* Bring in the RD analysis data
use "$root/data/rd analysis data.dta", clear

* Column 1
reg sub_per_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg sub_per_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 2
reg rem_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg rem_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 3
reg miss_share_detained_sheriff treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg miss_share_detained_sheriff treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 4
reg all_sheriff_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg all_sheriff_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 5
reg detained_sheriff_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg detained_sheriff_per1k_fb treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)
